Skip to content

Conversation

DarkLord017
Copy link

This pull request updates the polling logic in the StorageContext class to use exponential backoff with jitter when waiting for a piece to be "parked" (ready).

Fixes #293

Improvements to polling and retry logic:

  • Replaced the fixed polling interval with an exponential backoff strategy, introducing a baseDelay, maxDelay, and an attempt counter to increase the delay between retries.
  • Added random jitter to each backoff delay to help prevent synchronized retries and further reduce contention.

@github-project-automation github-project-automation bot moved this to 📌 Triage in FS Oct 18, 2025
Copy link
Collaborator

@rvagg rvagg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love this, I'm not really convinced we need this, it's a normal process of waiting for piece parking, IMO backoff is good for error conditions, but this isn't an error condition, all this will do is make it longer for a piece park wait to happen

blocking this for now, needs more consideration before merging, maybe someone else wants to make a stronger argument for this

@github-project-automation github-project-automation bot moved this from 📌 Triage to ⌨️ In Progress in FS Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ⌨️ In Progress

Development

Successfully merging this pull request may close these issues.

fix: add exponential backoff for findPiece

2 participants